package me.zk.practice1.hw;

import java.util.Arrays;
import java.util.Scanner;

public class HWBJ10 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String len = scanner.nextLine();

        String s = scanner.nextLine();


        int[] m = Arrays.stream(s.split(" ")).mapToInt(Integer::parseInt).toArray();

        int l = 0;
        for (int i = 1; i <m.length ; i++) {
            if (m[i]+ m[i-1] <100) {
                l += 100-m[i]-m[i-1];
            }
        }
        System.out.println(l);
    }
}
